package com.tobby.camelinaction.intercepter;

import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spring.Main;

public class MyRouteBuilder extends RouteBuilder {

	public static void main(String... args) throws Exception {
		Main.main(args);
	}

	@Override
	public void configure() throws Exception {
		from("file:src/data?noop=true")
			.choice()
			.when(xpath("/person/city = 'London'")).to("file:target/messages/uk")
			.otherwise().to("file:target/messages/others");
	}
	

}
